const cloud = require('wx-server-sdk');

cloud.init({
  env: 'cloud1-2gu4iyfmadd39493'
});
const db = cloud.database();

// 查询数据库集合云函数入口函数
exports.main = async (event, context) => {
  // 返回数据库查询结果
  let gameId = event.game;
  return await db.collection('game_info').where({_id:gameId}).get();
};